-- card: 6708 from stack: in.0-2 -- bmap block id: 30833 -- flags: 0000 -- background id: 10385 -- name: student.3 ----- HyperTalk script ----- on closeCard if icon of btn "switch" is 282 then click at loc of btn "switch" end closeCard on calculate get char 1 of card field "EMF" if it="+" then delete char 1 of card field "EMF" end if put card field "EMF" into E get char 1 of card field "R1" if it="+" then delete char 1 of card field "R1" end if put card field "R1" into R1 put abs(R1) into R1 put R1 into card field "R1" get char 1 of card field "R2" if it="+" then delete char 1 of card field "R2" end if put card field "R2" into R2 put abs(R2) into R2 put R2 into card field "R2" if E=0 then send zeroall exit calculate end if if R1=0 and R2=0 then put "zap" into card field "A1" put "zap" into card field "A2" put "zap" into card field "A3" put E into card field "V1" exit calculate end if if R1=0 then put "zap" into card field "A1" put "zap" into card field "A3" put 0 into card field "A2" put E into card field "V1" exit calculate end if if R2=0 then put "zap" into card field "A2" put "zap" into card field "A3" put 0 into card field "A1" put E into card field "V1" exit calculate end if put E/R1 into I1 put E/R2 into I2 put I1+I2 into I3 set numberFormat to "0.000" put E*1 into card field "V1" put I1 into card field "A1" put I2 into card field "A2" put I3 into card field "A3" end calculate --on closeField --set icon of btn "switch" to "open circuit" --send zeroall --end closeField on zeroall put 0 into card field "V1" put 0 into card field "A1" put 0 into card field "A2" put 0 into card field "A3" end zeroall -- part 2 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=128 top=199 right=233 bottom=167 -- title width / last selected line: 0 -- icon id / first selected line: 28757 / 28757 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: switch ----- HyperTalk script ----- on mouseUp if icon of me is 28757 then set icon of me to "close circuit" calculate else set icon of me to "open circuit" zeroall end if end mouseUp -- part 3 (field) -- low flags: 00 -- high flags: 0000 -- rect: left=89 top=140 right=153 bottom=125 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 65535 -- font id: 3 -- text size: 9 -- style flags: 256 -- line height: 12 -- part name: EMF ----- HyperTalk script ----- on closeField if icon of cd btn "Switch" is not 28757 then calculate end closeField -- part 4 (field) -- low flags: 00 -- high flags: 0000 -- rect: left=226 top=142 right=155 bottom=260 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 65535 -- font id: 3 -- text size: 9 -- style flags: 256 -- line height: 12 -- part name: R1 ----- HyperTalk script ----- on closeField if icon of cd btn "Switch" is not 28757 then calculate end closeField -- part 5 (field) -- low flags: 00 -- high flags: 0000 -- rect: left=306 top=142 right=155 bottom=340 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 65535 -- font id: 3 -- text size: 9 -- style flags: 256 -- line height: 12 -- part name: R2 ----- HyperTalk script ----- on closeField if icon of cd btn "Switch" is not 28757 then calculate end closeField -- part 6 (field) -- low flags: 01 -- high flags: 0002 -- rect: left=178 top=189 right=201 bottom=216 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 65535 -- font id: 3 -- text size: 8 -- style flags: 0 -- line height: 10 -- part name: V1 ----- HyperTalk script ----- on mouseUp if 3 = 4 then end if end mouseUp -- part 7 (field) -- low flags: 01 -- high flags: 0002 -- rect: left=201 top=252 right=264 bottom=237 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 65535 -- font id: 3 -- text size: 8 -- style flags: 0 -- line height: 10 -- part name: A3 ----- HyperTalk script ----- on mouseUp if 3 = 4 then end if end mouseUp -- part 8 (field) -- low flags: 01 -- high flags: 0002 -- rect: left=275 top=210 right=222 bottom=311 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 65535 -- font id: 3 -- text size: 8 -- style flags: 0 -- line height: 10 -- part name: A1 ----- HyperTalk script ----- on mouseUp if 3 = 4 then end if end mouseUp -- part 9 (field) -- low flags: 01 -- high flags: 0002 -- rect: left=354 top=211 right=223 bottom=390 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 65535 -- font id: 3 -- text size: 8 -- style flags: 0 -- line height: 10 -- part name: A2 ----- HyperTalk script ----- on mouseUp if 3 = 4 then end if end mouseUp -- part 11 (button) -- low flags: 00 -- high flags: 2000 -- rect: left=225 top=283 right=297 bottom=243 -- title width / last selected line: 0 -- icon id / first selected line: 15420 / 15420 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: ----- HyperTalk script ----- on mouseUp lock screen go prev unlock screen with wipe right end mouseUp -- part 12 (button) -- low flags: 00 -- high flags: 2000 -- rect: left=257 top=283 right=297 bottom=275 -- title width / last selected line: 0 -- icon id / first selected line: 16560 / 16560 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: ----- HyperTalk script ----- on mouseUp lock screen go next unlock screen with wipe left end mouseUp -- part 13 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=242 top=82 right=103 bottom=369 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 65535 -- font id: 174 -- text size: 14 -- style flags: 2304 -- line height: 18 -- part name: -- part contents for card part 3 ----- text ----- 20 -- part contents for card part 6 ----- text ----- 0 -- part contents for card part 8 ----- text ----- 0 -- part contents for card part 9 ----- text ----- 0 -- part contents for card part 7 ----- text ----- 0 -- part contents for card part 4 ----- text ----- 50 -- part contents for card part 5 ----- text ----- 50 -- part contents for card part 13 ----- text ----- PARALLEL